SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


create procedure dbo.DnnProduct_GetHtmlText

@ModuleID int,
@ItemID int

as

select dbo.DnnProduct_HtmlText.*,
       dbo.DnnProduct_WorkflowStates.*,
       dbo.DnnProduct_Workflow.WorkflowName,
       dbo.DnnProduct_Users.DisplayName,
       dbo.DnnProduct_Modules.PortalID
from   dbo.DnnProduct_HtmlText
inner join dbo.DnnProduct_Modules on dbo.DnnProduct_Modules.ModuleID = dbo.DnnProduct_HtmlText.ModuleID
inner join dbo.DnnProduct_WorkflowStates on dbo.DnnProduct_WorkflowStates.StateID = dbo.DnnProduct_HtmlText.StateID
inner join dbo.DnnProduct_Workflow on dbo.DnnProduct_WorkflowStates.WorkflowID = dbo.DnnProduct_Workflow.WorkflowID
left outer join dbo.DnnProduct_Users on dbo.DnnProduct_HtmlText.LastModifiedByUserID = dbo.DnnProduct_Users.UserID
where  dbo.DnnProduct_HtmlText.ModuleID = @ModuleID
and ItemID = @ItemID
GO
